from pyglet.gl import *
import data

label = pyglet.text.HTMLLabel('<b>Press any key to start</b>', x=300, y=200)
title_img = pyglet.image.load(data.filepath('foxrun.jpg'))
time_var = 0
color = '#000000' 
def drawMenu():
    global time_var, color, label 
    glClearColor(1, 1, 1, 1)
    glClear(GL_COLOR_BUFFER_BIT)
    sprite = pyglet.sprite.Sprite(title_img)
    sprite.x = 400-title_img.width/2
    sprite.y = 500-title_img.height
    sprite.draw()
    if time_var % 20 == 0:
        if color == '#000000':
            color = '#ffffff'
        else:
            color = '#000000'


    label.text = '<h3><font color='+color+'>Press any key to start</font></h3>'

    label.draw()
    time_var +=1
    glClearColor(0, 0, 0, 1)


